Hash `Kind` in metadata for crates
authorAlex Crichton <alex@alexcrichton.com>
Wed, 14 Jun 2017 18:16:24 +0000 (11:16 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 14 Jun 2017 18:19:33 +0000 (11:19 -0700)
commit7177f565764b18d12b8819078b3cb38b39a6c796
treee97f2bf9421f9960ee4bd9dfc6d93cb2100867ee
parentbcd961603ce5a55bbc9d0295ea992bd227fabf69
Hash `Kind` in metadata for crates

This fixes what is now a bug in Cargo discovered when attempting to land
rust-lang/rust#42495 where Cargo will compile both host and target artifacts
with the same `-C metadata` flag. This means that the compile can load two
crates with the same SVH that are supposed to be distinct, which causes weird
bugs with crate loading and whatnot.

This commit throws in the `Kind` into the metadata calculation to resolve this
to ensure that host/target artifacts always have a different `-C metadata`
src/cargo/ops/cargo_rustc/context.rs